<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <script src="vue.js"></script>
</head>
<body>
  <div id="app">
    <div v-for="(item,key) in list" data-id="key">
      索引是：{{key}}，元素内容是：{{item}}
    </div>
  </div>
  <script>
    var vm = new Vue({
      el: '#app',
      data: {
        list: [1, 2, 3]
      }
    })
  </script>
</body>
</html>